
<!--initialize javascript for ajax-->
<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>
/js/admin-ajax.js"></script>

<?php
$this->title = "Daftar Keluhan";
$this->headTitle($this->title);
?>


<div id="view-content">
<div class="tabledata" id="tabledata">
<table>
<tr class="head">
    <td>ID</td>
    <td>Username</td>
    <td>Tanggal</td>
    <td>Judul</td>
    <td>Keluhan</td>
    <td>Status</td>
</tr>
<span id="table-content">
<?php foreach($this->complain as $complain) : ?>
<tr style="background-color: <?= $this->cycle(array("#ccffcc","#99ff99"))->next(); ?>;">
 

    <td>  <a href="<?php echo $this->url(array('controller'=>'complain',
            'action'=>'details', 'id'=>$complain['id']));?>">
        <?php echo $this->escape($complain['id']);?></a>
    </td>
    <td><?php $buyer = $this->buyer->getBuyer($complain['buyer_id']); echo $buyer['username'];?></td>
    <td><?php echo $this->escape($complain['time']);?></td>
    <td><?php echo $this->escape($complain['title']);?></td>
    <td><?php echo $this->escape($complain['complain']);?></td>
    <td><?php if($this->escape($complain['status'] == 1)){echo "terbalas";}else{echo "belum terbalas";};?></td>

</tr>
<?php endforeach; ?>
</span>
<tr>
    <td colspan="7">
           <?= $this->back?>
           <?= $this->current?>/<?=$this->totalPages?>
          <?=$this->next?>
    </td>
</tr>
</table>
    </div>
</div>